//
//  UIImage+XYAdd.h
//  PeiJue
//
//  Created by lxy on 2017/9/27.
//  Copyright © 2017年 lixiya. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIImage (XYAdd)

/** 颜色，返回一个UIImage:不透明 */
+ (UIImage *)imageFromContextWithColor:(UIColor *)color;
+ (UIImage *)imageFromContextWithColor:(UIColor *)color size:(CGSize)size;

/**
 *  改变image透明度
 *
 *  @param alpha 透明度
 */
- (UIImage *)imageWithAlpha:(CGFloat)alpha;


/**
 *  view截屏(快照)
 *
 *  @param view     截屏的view
 *  @param snapSize 截屏大小
 */
+ (UIImage *)snapshotWithView:(UIView *)view size:(CGSize)snapSize;

+ (UIImage *)snapshotWithView:(UIView *)view;

/**
 *  直接截屏
 */
+(UIImage *)snapshotScreen;


@end
